//
// Created by iti on 2023/8/1.
//

#ifndef RS485_H750_CRC16_H
#define RS485_H750_CRC16_H

#endif //RS485_H750_CRC16_H

#include "main.h"

#define CRC_H_INIT_VAL                  0xFF
#define CRC_L_INIT_VAL                  0xFF

uint16_t crc16(uint8_t *buf, uint16_t len);     //计算CRC16的值
void crc16_set(uint8_t *buf, uint32_t len);       //设置CRC16的值
uint8_t crc16_check(uint8_t *buf, uint32_t len);     //校验CRC16的值是否正确
unsigned short crc_compute(unsigned char *vptr, unsigned char len);


